package cn.wolfcode.trip.base.mapper;

import cn.wolfcode.trip.base.domain.Cart;
import cn.wolfcode.trip.base.query.QueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface CartMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Cart record);

    Cart selectByPrimaryKey(Long id);


    int updateByPrimaryKey(Cart record);

    List<Cart> selectCartForState(@Param("userId") Long userId, @Param("stateUndetermined") Integer stateUndetermined);


    Cart checkMsg(@Param("userId") Long userId, @Param("goodsId") Long goodsId, @Param("stateUndetermined") Integer stateUndetermined);

    void updateCountNPrice(Cart cart);

    List<Cart> selectList(QueryObject qo);

    void updateState(Cart cart);
}